<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    * {
      /* color: rgb(255, 0, 0, 0.6); */
    }
  </style>
</head>

<body>
  <canvas id="myCanvas" width="400" height="400"></canvas>

  <script>
    const myCanvas = document.getElementById('myCanvas');

    const ctx = myCanvas.getContext('2d');

    // ctx.scale(1, 2); // 缩放
    // ctx.arc(150, 150, 100, 0, Math.PI * 2, true);

    // ctx.stroke();

    // 圆环
    ctx.shadowColor = 'rgb(255, 0, 0, 0.6)'; // 设置阴影颜色
    ctx.shadowOffsetX = 10; // 设置阴影 X 轴偏移
    ctx.shadowOffsetY = 10; // 设置阴影 Y 轴偏移
    ctx.shadowBlur = 10; // 设置阴影模糊值

    ctx.fillStyle = 'red';

    ctx.beginPath();
    ctx.arc(150, 150, 150, 0, Math.PI * 2, false);
    ctx.arc(150, 150, 100, 0, Math.PI * 2, true);
    ctx.fill();
  </script>
</body>

</html>